<?php

namespace App\Http\Controllers\System;

use App\Http\Controllers\Controller;
use App\Libs\Tools\UploadTools;
use Illuminate\Support\Facades\Input;

class DownloadController extends Controller
{
    public function __construct(){}

    public function index(){
        return view('system.download.downloadMain');
    }

    public function download(){
        $fileName=Input::get('name');
        $filePath=UploadTools::getFilePath('download'.'/'.$fileName);
        return response()->download($filePath);
    }
}
